package com.sieg.service.impl;

import com.sieg.dao.UserDao;
import com.sieg.domain.User;
import com.sieg.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    @Override
    public int addUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public User loginUser(User user) {
        return userDao.loginSelectUser(user);
    }

    @Override
    public List<User> registerUser(User user) {
        return userDao.registeSelectUser(user);
    }
}
